<style type='text/css'>
/*-- 카테고리명 --*/
.cate  {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:link, a.b_ca:visited, a.b_ca:active {font-family:Tahoma,굴림,arial; color:#666666; font-size:12px;}
a.cate:hover {font-family:Tahoma,굴림, arial; color:#FF6600; font-size:12px; text-decoration:none;}
</style>

<? $cnt_bo_1 =  6; // 한줄당 분류 갯수 ?>

<? if (!$wr_id) {  ?>
<!-- 분류 셀렉트 박스 시작 -->
<?
    $cnt = 1;
    $sql = " SELECT bo_category_list FROM $g4[board_table] WHERE bo_table = '$bo_table' ";
    $row = sql_fetch($sql);
    $arr = explode("|", $row[bo_category_list]); // 구분자가 , 로 되어 있음
    $str = "";
    $str .= "<tr>";
    for ($i=0; $i<count($arr); $i++) 
        if (trim($arr[$i]))  {
		$sql1 = " SELECT count(*) as cCount FROM $write_table WHERE ca_name='$arr[$i]' and wr_is_comment='0'";
    		$row1 = sql_fetch($sql1);        	
            $str .= "<td><img src='{$board_skin_path}/img/ico_folder.gif' width='13' height='11'>&nbsp;<a class='cate'  href='./board.php?bo_table=$bo_table&sca=$arr[$i]&sop=&sst=wr_1&sod=desc&sfl=&stx=&page=1'>$arr[$i]</a></td>";
		if ($cnt == $cnt_bo_1) { $cnt = 0; $str .= "</tr><tr>"; }
     	$cnt++;
    }
    
    $sql2 = " SELECT count(*) as cCount FROM $write_table WHERE wr_is_comment = '0' ";
    $row2 = sql_fetch($sql2);
    $Total_Cat = $row2[cCount]
?>

<table width=100% cellspacing=1 cellpadding=4 border=0 style=table-layout:fixed>
<col width=90></col>
<col width=20></col>
<col width=></col>

<tr bgcolor=white>
	<td>
	  <table border=0 cellspacing=0 cellpadding=0 width=100%>
		<?=$str?>
	  </table>
	</td>
</tr>
</table>
<!-- 분류 셀렉트 박스 끝 -->
<? } ?>